package com.sayimo.maker.activity.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.sayimo.framework.database.mybatis.AbstractMybatisBaseDao;
import com.sayimo.framework.exception.DaoException;
import com.sayimo.maker.activity.dao.BaseSeckillGoodsDao;
import com.sayimo.maker.activity.vo.BaseSeckillGoods;


/**
 * @Copyright (c) 2016 广东省尚一互联网有限公司
 * @Project: schoolmallapi-2.0
 * @ClassName: BaseSeckillGoodsDaoImpl.java
 * @Description: 
 * @Author:	tanxin
 * @Date:2016年10月7日,下午4:13:25
 * @Version 1.0.0
 */
@Repository(value="baseSeckillGoodsDao")
public class BaseSeckillGoodsDaoImpl extends AbstractMybatisBaseDao<BaseSeckillGoods> implements BaseSeckillGoodsDao{
	/**
	 * @Package com.sayimo.maker.activity.dao.impl
	 * @Author TANXIN
	 * @MethodName:selectBaseSeckillTimesIdentifier
	 * @Description:根据标示符查询活动普通商品信息
	 * @param identifier
	 * @return
	 * @throws DaoException
	 * @Date 2016年10月7日,下午4:14:14
	 */
	@Override
	@SuppressWarnings({ "rawtypes"})
	public List<BaseSeckillGoods> selectBaseSeckillGoodsIdentifier(String identifier,Integer seckillTimesId)
			throws DaoException {
		Map map=new HashMap();
		map.put("identifier", identifier);
		map.put("seckillTimesId", seckillTimesId);
		return this.mybatisInterfaceBaseDao.query("com.sayimo.maker.activity.dao.BaseSeckillGoodsDao.selectBaseSeckillGoodsIdentifier", map);
	}
	/**
	 * @Package com.sayimo.maker.activity.dao.impl
	 * @Author TANXIN
	 * @MethodName:selectBaseSeckillPreGoodsIdentifier
	 * @Description:根据标示符查询活动预约商品信息
	 * @param identifier
	 * @param seckillTimesId
	 * @return
	 * @throws DaoException
	 * @Date 2016年10月7日,下午5:24:25
	 */
	@Override
	public List<BaseSeckillGoods> selectBaseSeckillPreGoodsIdentifier(String identifier,Integer seckillTimesId)
			throws DaoException {
		Map map=new HashMap();
		map.put("identifier", identifier);
		map.put("seckillTimesId", seckillTimesId);
		return this.mybatisInterfaceBaseDao.query("com.sayimo.maker.activity.dao.BaseSeckillGoodsDao.selectBaseSeckillPreGoodsIdentifier", map);
	}


	@Override
	public Map querySeckillGoodsInfoByGoodsId(Integer goodsId,
			String identifier, Integer seckillTimesId) throws DaoException {
		Map map=new HashMap();
		map.put("goodsId", goodsId);
		map.put("identifier", identifier);
		map.put("seckillTimesId", seckillTimesId);
		// TODO Auto-generated method stub
		return (Map<String, Object>) this.mybatisInterfaceBaseDao.getObject("com.sayimo.maker.activity.dao.BaseSeckillGoodsDao.querySeckillGoodsInfoByGoodsId", map);
	}

}
